package com.mikelouis.test.scala.proginscala.chapter14

import org.scalatest.junit.JUnit3Suite

/**
 * Created by yuazhu on 1/16/2015.
 */
class Element2Junit3TestSuite extends JUnit3Suite {
  def testUniformElement() {
    val ele = Element2.elem('x', 2, 3)
    assert(ele.width == 2)
    expect(3) {
      ele.height
    }

    intercept[IllegalArgumentException] {
      Element2.elem('x', -2, 3)
      throw new IllegalArgumentException("manually throw IllegalArgumentException")
    }
  }
}
